package com.qf.interfaceserver.config;

import com.qf.constant.RabbitMQConstants;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Created by 马英超 on 2022/10/20 16:42
 * @author： 马英超
 * @version：v1.0
 * @description: .__
 * ___________________|__| ____    ____
 * /  ___/\____ \_  __ \  |/    \  / ___\
 * \___ \ |  |_> >  | \/  |   |  \/ /_/  >
 * /____  >|   __/|__|  |__|___|  /\___  /
 * \/ |__|                 \//_____/
 */
@Configuration
public class RabbitMQConfig {
    /**
     * 创建队列，将通过审核的手机号、短信内容封装后发送到该队列中，交由后续的策略服务处理
     * @return
     */
    // 发送短信的消息队列名  ---  接口模块发送消息到策略模块
    @Bean
   public Queue preSendQueue(){
        return new Queue(RabbitMQConstants.TOPIC_PRE_SEND,true);
    }

    /**
     * 接口向客户端反馈消息队列
     * @return
     */
    //推送状态报告TOPIC    ---      让接口模块给客户端一个推送.
    @Bean
    public  Queue sendLogQueue(){
        return new Queue(RabbitMQConstants.TOPIC_SMS_SEND_LOG,true);
    }

    /**
     * 日志修改队列
     * @return
     */
    @Bean
    public Queue reportUpdateSendQueue(){
        return  new Queue(RabbitMQConstants.TOPIC_PUSH_SMS_REPORT,true);
    }

    /**
     * 待发送短信网关队列
     * @return
     */
    @Bean
    public Queue sendGatewayQueue(){
        return new Queue(RabbitMQConstants.TOPIC_SMS_GATEWAY,true);
    }

   public  Queue filtersUpdateExchangeQueue(){
        return new Queue(RabbitMQConstants.TOPIC_FILTER_UPDATE,true);
   }

}
